package com.shop2cn.iapi.sqpayment.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.gson.JsonObject;
import com.shop2cn.iapi.sqpayment.parameter.SendFqlSmsCodeBean;
import com.shop2cn.iapi.sqpayment.service.SendFqlSmsCodeCall;
import com.ymatou.iapi.userregister.parameter.UserRegisterInfoRequestDtoBean;
import com.ymatou.iapi.userregister.service.UserRegisterInfoRequestDtoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.JUserCallService;
/**
*分期乐发送短信验证码
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_SendFqlSmsCode{
	private static SendFqlSmsCodeBean sendfqlsmscodeBean;
	private static SendFqlSmsCodeCall sendfqlsmscodeCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("分期乐发送短信验证码");
	}

	@Before
	public void caseUp() {
		sendfqlsmscodeBean=new SendFqlSmsCodeBean();
		sendfqlsmscodeCall=new SendFqlSmsCodeCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(sendfqlsmscodeCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_SendFqlSmsCode_001() {
		Logger.start(true,"分期乐发送短信验证码成功");
		try {
			//手工验证-查看日志
			sendfqlsmscodeBean.setUserId(25328855);
			sendfqlsmscodeBean.setMobile("19999999999");
			sendfqlsmscodeCall.setData(sendfqlsmscodeBean);
			sendfqlsmscodeCall.callService();			
			//{"ErrorCode":5000,"ErrorMessage":"请勿频繁调用，等待60秒后再重试","IsSuccess":false}
			Logger.verifyEquals("IsSuccess", sendfqlsmscodeCall.getString("IsSuccess"), "IsSuccess");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}